<section id="login-form">
    
    <?php if (isset($error)): ?>
        <pre><?php echo $error ?></pre>
    <?php endif; ?>
    
    <h2>Login form</h2>
    <form method="POST">
        
        <?php if (isset($form)): ?>
            <b>Login:</b>
            <p><input type="text" name="login" value="<?php echo $form['login'] ?>"></p>
        <?php else: ?>
            <b>Login:</b>
            <p><input type="text" name="login"></p>
        <?php endif; ?>             
            
        <b>Password:</b>
        <p><input type="text" name="password"></p>

            
        <button type="submit">Sign In</button>
    </form>
</section>